![]() |
PATH![]() |
The ATA_MgrInquiry function gets information, such as the version number, about the ATA Manager.
The ataPIOMaxMode , ataSingleDMAModes , and ataMultiDMAModes fields of the ATA_MgrInquiry function are obsolete in ATA Manager version 4.0 and later. The services provided in these fields have been moved to the ATA_BusInquiry function. This change aligns better with the services required to support different modes (polled I/O or DMA) on multiple ATA buses, which ATA Manager 4.0 and later provide. An example of a Macintosh computer that has multiple ATA buses requiring different mode support is the PowerBook 3400. It supports PCMCIA ATA devices requiring PIO data transfer on one ATA bus and an internal ATA drive that supports DMA transfers on the other ATA bus.
The manager function code for the ATA_MgrInquiry function is $90.
The parameter block associated with this function is defined below:
typedef | struct | /* ATA inquiry structure */ | |
{ | |||
ataPBHdr | /* ataPBHdr parameter block */ | ||
NumVersion | MgrVersion | /* Version of ATA Manager */ | |
UInt8 | MGRPBVers; | /* <-- Manager PB version */ /*number supported */ |
|
UInt8 | Reserved1; | /* Reserved */ | |
UInt16 | ataBusCnt; | /* <-- Number of ATA buses in */
/*system */ |
|
UInt16 | ataDevCnt; | /* <-- Number of ATA devices detected */ |
|
UInt8 | ataPIOMaxMode; | /* <-- Maximum PIO speed mode */ | |
UInt8 | Reserved2; | /* Reserved */ | |
UInt16 | Reserved3; | /* Reserved */ | |
UInt8 | ataSingleDMAModes; | /* <-- Singleword DMA modes */ /*supported */ |
|
UInt8 | ataMultiDMAModes; | /* <-- Multiword DMA modes */ /*supported */ |
|
UInt16 | Reserved[16]; | /* Reserved */ | |
} ataMgrInquiry; |
Some early Macintosh computer ROMs indicate that the ATA Manager is present without actually having the proper hardware to support ATA devices. When this happens it is possible to halt the system. It is always best to inquire as to whether the computer has ATA hardware before detecting the presence of the ATA Manager. The following prototype code shows how to detect the ATA Manager properly.
Boolean ATAManagerPresent(void)
{
UInt16 configFlags;
Boolean ATAIsHere = true;
configFlags = LMGetHWCfgFlags();
if (!(configFlags & 0x0080))
ATAIsHere = false;
/* see Inside Macintosh Volume VI chapter 3 for */
/* defintion of TrapAvailable */
if (ATAIsHere && TrapAvailable(kATATrap))
ATAIsHere = true;
return ATAIsHere;
}
See Table A-1 for possible result codes returned by the ATA Manager.
Previous | Back Up One Level | Next | Show Frames | Hide Frames